﻿using Jinjia.Approve.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
using Jinjia.Approve.Entity.Entity;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.Input;
using Jinjia.Approve.Model.VM;
using Jinjia.Approve.Model.VM.JJFlow;

namespace Jinjia.Approve.IRepository
{
    public interface IJJFlowCommentRepository
    {
        Task<int> Save(jj_flow_comment_tbl data);

        Task<List<jj_flow_comment_tbl>> GetCommentByBizOrderIdAndModularKey(string biz_order_id, string modular_key);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="is_append">否追加单据1：是;0：否</param>
        /// <returns></returns>
        Task UpdateIsAppend(List<int> ids, int is_append);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="is_append">否追加单据1：是;0：否</param>
        /// <returns></returns>
        Task UpdateIsAppend(int id, int is_append);

        /// <summary>
        /// 获取“查阅日志”列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<JJFlowCommentVM>> GetJJFlowCommentsWhitFilter(JJFlowCommentSearchInput input);

        /// <summary>
        /// 新增（评论& 文件信息）
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> InsertCommentAndFileInfo(JJFlowCommentCreateInput input);

        Task UpdateIsAppend(string biz_order_id, string modular_key);
    }
}